package moe.hotk.repository

import scala.concurrent.stm._

class IdGenerator {

  private val current = Ref(0)

  def next(): Int = atomic { implicit txn =>
    current() += 1
    current()
  }

}
